package com.lastproject.ejb.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@NamedQuery(name = "Interview.findAll", query = "SELECT i FROM Interview i")
public class Interview implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4266892609222037940L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id")
	private int id;

	@Temporal(TemporalType.DATE)
	private Date date;

	private String details;

	@ManyToOne
	@JoinColumn(name = "idCandidate")
	private Candidate candidate;

	@ManyToOne
	@JoinColumn(name = "idInterviewer")
	private Employee interviewer;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}

	public Candidate getCandidate() {
		return candidate;
	}

	public void setCandidate(Candidate candidate) {
		this.candidate = candidate;
	}

	public Employee getInterviewer() {
		return interviewer;
	}

	public void setInterviewer(Employee interviewer) {
		this.interviewer = interviewer;
	}

}
